package com.china.produce.listener;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @ClassName
 * @Author niujie
 * @Version
 * @Description
 * @CreateTime 2025/8/10
 */
@Slf4j
@Component
@RocketMQMessageListener(topic = "tx_topic", consumerGroup = "tx_consumer_group")
public class TxMessageConsumerListener implements RocketMQListener<String> {

    @Override
    public void onMessage(String message) {
        log.info("接收到事务消息: {}", message);
    }
}
